import service from "@/utils/request";

// 获取列表接口
export const getExamListApi = (params) => {
  return service({
    method: 'get',
    url: '/exam/exam',
    params
  })
}
// 推送班级
export const bindClassApi = (data) => {
  return service({
    method: "POST",
    url: "/exam/exam/bindClass",
    data
  })
}
// 学科名称
export const getSubjectListApi = () => {
  return service({
    url: "/subject/tree",
  })
}
// 学科目录
export const getDirectoryListApi = () => {
  return service({
    url: "/subject/directory",
  })
}

// 班级列表
export const getClassListApi = (params) => {
  return service({
    url: "/class/class",
    params
  })
}

// 删除
export const delClassListApi = id => {
  return service({
    url: `/exam/exam/${id}`,
    method: 'DELETE'
  })
}

// 试卷信息
export const getPaperListApi = (params) => {
  return service({
    url: "/exam/paper",
    params
  })
}

// 创建考试
export const getExamApi = (data) => {
  return service({
    method: 'POST',
    url: '/exam/exam',
    data
  })
}